//
//  SocketManager.h
//  AngelClient
//
//  Created by wbb on 2021/8/4.
//  Copyright © 2021 lby. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
typedef void(^ContentBlock)(NSString *msg);
@interface SocketManager : NSObject

@property(nonatomic, copy) void(^ContentBlock)(NSString *msg);

/// 单利
+ (instancetype)sharedSocketManager;


/// 初始化socket
/// @param host IP地址
/// @param port 端口号
- (void)connect:(NSString *)host port:(int)port;

/// 发送数据
/// @param msg 内容
- (void)sendMsg: (NSString *)msg;

/// 关闭输入输出流
- (void)closeSocket;
@end

NS_ASSUME_NONNULL_END
